import request from '@/config/axios'
import type { Dayjs } from 'dayjs';

/** 学校合作申请单信息 */
export interface WelfareSchoolApply {
          id: number; // 主键ID
          schoolName?: string; // 学校名称
          contactPerson?: string; // 联系人
          mobile?: string; // 手机号码
          schoolAddress?: string; // 学校地址
          cooperationIntention?: string; // 合作意向
  }

// 学校合作申请单 API
export const WelfareSchoolApplyApi = {
  // 查询学校合作申请单分页
  getWelfareSchoolApplyPage: async (params: any) => {
    return await request.get({ url: `/mcm/welfare-school-apply/page`, params })
  },

  // 查询学校合作申请单详情
  getWelfareSchoolApply: async (id: number) => {
    return await request.get({ url: `/mcm/welfare-school-apply/get?id=` + id })
  },

  // 新增学校合作申请单
  createWelfareSchoolApply: async (data: WelfareSchoolApply) => {
    return await request.post({ url: `/mcm/welfare-school-apply/create`, data })
  },

  // 修改学校合作申请单
  updateWelfareSchoolApply: async (data: WelfareSchoolApply) => {
    return await request.put({ url: `/mcm/welfare-school-apply/update`, data })
  },

  // 删除学校合作申请单
  deleteWelfareSchoolApply: async (id: number) => {
    return await request.delete({ url: `/mcm/welfare-school-apply/delete?id=` + id })
  },

  /** 批量删除学校合作申请单 */
  deleteWelfareSchoolApplyList: async (ids: number[]) => {
    return await request.delete({ url: `/mcm/welfare-school-apply/delete-list?ids=${ids.join(',')}` })
  },

  // 导出学校合作申请单 Excel
  exportWelfareSchoolApply: async (params) => {
    return await request.download({ url: `/mcm/welfare-school-apply/export-excel`, params })
  },
}